package com.oo.packaging_2.students;

/**
 * Student--${description}
 *
 * @author: Jovi
 * @createTime: 2017-04-19 14:29
 **/
public class Student {

    private String name;

    private int age;

    private String sex;

    private int id;

    public Student(String name, int age, String sex, int id) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.id = id;
    }

    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void learn(String school,String major) {
        System.out.println("大家好！我叫" + this.getName() + "，今年" + getAge());
        System.out.println("我现在就读于" + school + "----" + major);
        System.out.println("我的学号是"+getId());
    }
}
